.TH std::experimental::future 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::experimental::future \- std::experimental::future

.SH Synopsis
   Defined in header <experimental/future>
   template< class T > class future;       \fB(1)\fP (concurrency TS)
   template< class T > class future<T&>;   \fB(2)\fP (concurrency TS)
   template<> class future<void>;          \fB(3)\fP (concurrency TS)

   The class template std::experimental::future extends std::future with the following
   operations:

     * an unwrapping constructor from future<future<T>>;
     * a member function is_ready to query whether the associated shared state is
       ready; and
     * a member function then to attach a continuation to the future.

   However, there is no interoperation between std::experimental::future and
   std::future.

.SH Member functions

   constructor   construct a future object
                 \fI(public member function)\fP
   is_ready      checks if the shared state is ready
                 \fI(public member function)\fP
   then          attaches a continuation to a future
                 \fI(public member function)\fP
   operator=     moves the future object
                 \fI(public member function)\fP

Members identical to std::future

.SH Member functions

   Note that share() returns a std::experimental::shared_future<T>. The behavior is
   otherwise identical.

   destructor   destructs the future object
                \fI(public member function of std::future<T>)\fP
   share        transfers the shared state from *this to a shared_future and returns it
                \fI(public member function of std::future<T>)\fP
.SH Getting the result
   get          returns the result
                \fI(public member function of std::future<T>)\fP
.SH State
   valid        checks if the future has a shared state
                \fI(public member function of std::future<T>)\fP
   wait         waits for the result to become available
                \fI(public member function of std::future<T>)\fP
                waits for the result, returns if it is not available for the specified
   wait_for     timeout duration
                \fI(public member function of std::future<T>)\fP
                waits for the result, returns if it is not available until specified
   wait_until   time point has been reached
                \fI(public member function of std::future<T>)\fP

.SH Example

    This section is incomplete
    Reason: no example

.SH See also

   shared_future    a version of std::shared_future enhanced with continuations and
   (concurrency TS) other features
                    \fI(class template)\fP

.SH Category:
     * Todo no example
